﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Runtime.InteropServices;
//using System.Text;
//using System.Threading.Tasks;
//using NUnit.Framework;
//using Sim;
//using Lists;
//using Users;

//namespace SimTest
//{
//    [TestFixture]
//    public class TestClass2
//    {
//        [Test]
//        public void TournamentSimulationTest()
//        {
//            DDList dd = new DDList();
//            dd.Readfromfile();
//            DDList.SerializeToXML();
//            TournamentList.SerializeToXML(); //Skapar ny XML fil för turneringar
//            UserList.SerializeToXML();      //Skapar ny användarlista

//            Tournament t = new Tournament("VM2020", DateTime.Today, 10, "Male", 5, 3);
//            TournamentList.AddTournament(t);

//            //Registrering av användare =Simhoppare=
//            UserList.AddUser(new User("Van", "Nguyen", 21, "VN", "Male", 0, "vanngh121", "hejhopp123"));
//            UserList.AddUser(new User("Amjad", "Hematkar", 24, "IR", "Male", 0, "amjmah121", "lolol"));
//            UserList.AddUser(new User("Gabriel", "Kasto", 23, "SY", "Male", 0, "gabkah121", "yoyo"));
//            UserList.AddUser(new User("Adam", "Ludenberg", 22, "SE", "Female", 0, "adaluh121", "derp"));
//            //Registrering av användare =Dommare=
//            UserList.AddUser(new User("Dum1", "Dummare1", 12, "FI", "Male", 1, "j1", "jjj"));
//            UserList.AddUser(new User("Dum2", "Dummare2", 12, "UK", "Male", 1, "j2", "iii"));
//            UserList.AddUser(new User("Dum3", "Dummare3", 12, "US", "Male", 1, "j3", "hhh"));
//            UserList.AddUser(new User("Dum4", "Dummare4", 12, "CN", "Male", 1, "j4", "ggg"));
//            UserList.AddUser(new User("Dum5", "Dummare5", 12, "AU", "Male", 1, "j5", "fff"));
//            UserList.AddUser(new User("Dum6", "Dummare6", 12, "DK", "Male", 1, "j6", "eee"));
//            UserList.AddUser(new User("Dum7", "Dummare7", 12, "NO", "Male", 1, "j7", "ddd"));

//            //Lägger till domare i tävlingen
//            t.AddJudge("j1");
//            t.AddJudge("j2");
//            t.AddJudge("j4");
//            t.AddJudge("j6");
//            t.AddJudge("j7");

//            //Lägger till hoppare i tävlingen
//            t.AddDiver("vanngh121");
//            t.AddDiver("adaluh121");
//            t.AddDiver("gabkah121");

//            //==HOPP1==
//            //Hoppare 1 hoppar
//            t.diverList[0].dives.Add(new Dive());
//            //Domarbedömning
//            t.diverList[0].dives[0].setJudgeScore(5.5, 3);
//            t.diverList[0].dives[0].setJudgeScore(3.5, 4);
//            t.diverList[0].dives[0].setJudgeScore(2, 5);
//            t.diverList[0].dives[0].setJudgeScore(6, 6);
//            t.diverList[0].dives[0].setJudgeScore(4.5, 7);
//            //Kalkylering
//            t.diverList[0].dives[0].CalcPtsnDD("6265C", t.jumpHeight);

//            //Hoppare 2 hoppar
//            t.diverList[1].dives.Add(new Dive());
//            //Domarbedömning
//            t.diverList[1].dives[0].setJudgeScore(7, 3);
//            t.diverList[1].dives[0].setJudgeScore(3.5, 4);
//            t.diverList[1].dives[0].setJudgeScore(5, 5);
//            t.diverList[1].dives[0].setJudgeScore(6, 6);
//            t.diverList[1].dives[0].setJudgeScore(4.5, 7);
//            //Kalkylering
//            t.diverList[1].dives[0].CalcPtsnDD("6261B", t.jumpHeight);

//            //==HOPP2==
//            //Hoppare 1 hoppar
//            t.diverList[0].dives.Add(new Dive());
//            //Domarbedömning
//            t.diverList[0].dives[1].setJudgeScore(1, 3);
//            t.diverList[0].dives[1].setJudgeScore(6, 4);
//            t.diverList[0].dives[1].setJudgeScore(2, 5);
//            t.diverList[0].dives[1].setJudgeScore(6.5, 6);
//            t.diverList[0].dives[1].setJudgeScore(2.5, 7);
//            //Kalkylering
//            t.diverList[0].dives[1].CalcPtsnDD("5233D", t.jumpHeight);

//            //Hoppare 2 hoppar
//            t.diverList[1].dives.Add(new Dive());
//            //Domarbedömning
//            t.diverList[1].dives[1].setJudgeScore(9.5, 3);
//            t.diverList[1].dives[1].setJudgeScore(10, 4);
//            t.diverList[1].dives[1].setJudgeScore(5, 5);
//            t.diverList[1].dives[1].setJudgeScore(6, 6);
//            t.diverList[1].dives[1].setJudgeScore(4.5, 7);
//            //Kalkylering
//            t.diverList[1].dives[1].CalcPtsnDD("5311A", t.jumpHeight);





//            //UserList.userList.Clear();
//            UserList.SerializeToXML();

//            //TournamentList.tournamentList.Clear();
//            TournamentList.SerializeToXML();


//        }
        
//    }
//}

